SpreadsheetGear 2023
AddPicture(Byte[],Double,Double,Double,Double) Method


SpreadsheetGear.Shapes Namespace > IShapes Interface > AddPicture Method : AddPicture(Byte[],Double,Double,Double,Double) Method
A byte array containing the picture data; this byte array must not be changed after calling AddPicture.
Left edge of the new picture in points.
Top edge of the new picture in points.
Width of the new picture in points.
Height of the new picture in points.
Adds the specified picture to the shapes collection at the specified position and with the specified size.
Syntax
'Declaration
 
Overloads Function AddPicture( _
   ByVal pictureData() As System.Byte, _
   ByVal left As System.Double, _
   ByVal top As System.Double, _
   ByVal width As System.Double, _
   ByVal height As System.Double _
) As IShape
'Usage
 
Dim instance As IShapes
Dim pictureData() As System.Byte
Dim left As System.Double
Dim top As System.Double
Dim width As System.Double
Dim height As System.Double
Dim value As IShape
 
value = instance.AddPicture(pictureData, left, top, width, height)
IShape AddPicture( 
   System.byte[] pictureData,
   System.double left,
   System.double top,
   System.double width,
   System.double height
)

Parameters

pictureData
A byte array containing the picture data; this byte array must not be changed after calling AddPicture.
left
Left edge of the new picture in points.
top
Top edge of the new picture in points.
width
Width of the new picture in points.
height
Height of the new picture in points.

Return Value

A shape object representing the newly created picture.
Remarks

Use SpreadsheetGear.IWorksheetWindowInfo.RowToPoints and SpreadsheetGear.IWorksheetWindowInfo.ColumnToPoints to convert row and column positions to points.

Pictures with PNG, JPEG and Enhanced Windows Metafiles magic signatures are stored in the workbook as is. All other images are converted to PNG before being stored in the workbook.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

IShapes Interface
IShapes Members
Overload List
RowToPoints Method
ColumnToPoints Method